import Item from '../item/Item';
import { useTodolistStoreContext } from '../../store';
import {observer} from 'mobx-react'

const List = observer(() => {
    const store = useTodolistStoreContext();
    console.log(store);
    const { todolist } = store;
    return (
        <ul className="todo-main">
            {
                todolist.map(todo => 
                    <Item key={todo.id} datasourse={todo}/>
                )
            }
            
        </ul>
    );
})

export default List;
